package net.xxcxcxcx.xc_enhancedmob.render.boss_bar.unit.client;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.xxcxcxcx.xc_enhancedmob.render.TextureElement;

import java.util.concurrent.CopyOnWriteArrayList;

/**
 * ClientCustomBossBar的接口
 */
@Environment(EnvType.CLIENT)
public interface ClientBaseCustomBossBar {

    //获取当前血条的像素宽度
    int getWidth();

    int getHeight();

    //检测是否有下一层
    boolean hasNextLayer(float tickDelta);

    //计算实时渲染的血条层数
    int CalculateNowLayerCount(float tickDelta);

    //计算实时渲染的血条百分比
    float CalculateLayerPercentage(float tickDelta);

    int NowLayerCount();

    //计算显示的层占显示血条的百分比
    float NowLayerPercentage();

    CopyOnWriteArrayList<TextureElement> getLayers();

    //获取当前层、下一层的纹理
    TextureElement getCurrentLayerTexture(float tickDelta);

    TextureElement getNextLayerTexture(float tickDelta);

    //获取背景、前面计量条纹理
    TextureElement getBackground();

    boolean isNeedMeterCover();

    TextureElement getMeterCover();

    int getMeterOffsetX0();

    int getMeterOffsetY0();

    int getMeterOffsetX1();

    int getMeterOffsetY1();
}
